app.controller('exportHouseImgCtrl', function($element, $scope, $state, rest, user, uploadConf, tipService, $window, $rootScope, decoJavaUrlLsf) {
    $scope.idstring = angular.copy($scope.ngDialogData, {});
    var token = $window.localStorage.getItem("token");

    rest.decoJava({
        type: "post",
        url: "/tenancy-sys/admin/house/getExcelList",
        data: "",
        beforeSend: function(request) {
            request.setRequestHeader("token", token);
        },
        success: function(res) {
            $scope.ExcelDatas = res;
            $scope.$apply();
            $("#_ajaxForm").attr("action", decoJavaUrlLsf + "/tenancy-sys/admin/house/exportHouseImg"); //form请求地址
        }
    })

    $scope.keysstring = "";
    $(document).on("click", ".checkboxBar span input[type='checkbox']", function() {
        var _id = "";
        $(".checkboxBar input[type='checkbox']").each(function() {
            if ($(this).is(":checked")) {
                _id += $(this).attr("data-id") + ",";
            }
        })
        _id = _id.substring(0, _id.length - 1)
        $scope.keysstring = _id;
        $scope.$apply();
        console.log($scope.keysstring)

    });

    $scope.exportData = function() {
        $("#_ajaxForm").submit();
        $scope.closeThisDialog();
    }

    $scope.hideBtn = function() {
        $scope.closeThisDialog();
    }

});